package com.dingup.paike.bean.aobean;

import com.dingup.paike.enums.PkLessonUserTypeEnum;

import java.math.BigDecimal;

/**
 * Created by wancheng on 2018/11/1.
 */
public class StatisticsClassHourAO {

    private String userId;

    private String userName;

    private String lessonName;

    private Integer lessonId;

    private BigDecimal classHour;

    private BigDecimal classHourOfTotal;

    private PkLessonUserTypeEnum type;

    private Integer classId;

    private String exam;

    public StatisticsClassHourAO() {
    }

    public StatisticsClassHourAO(String userId, String userName, String lessonName, Integer lessonId, BigDecimal classHour, PkLessonUserTypeEnum type, Integer classId, String exam) {
        this.userId = userId;
        this.userName = userName;
        this.lessonName = lessonName;
        this.lessonId = lessonId;
        this.classHour = classHour;
        this.type = type;
        this.classId = classId;
        this.exam = exam;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLessonName() {
        return lessonName;
    }

    public void setLessonName(String lessonName) {
        this.lessonName = lessonName;
    }

    public BigDecimal getClassHour() {
        return classHour;
    }

    public void setClassHour(BigDecimal classHour) {
        this.classHour = classHour;
    }

    public PkLessonUserTypeEnum getType() {
        return type;
    }

    public void setType(PkLessonUserTypeEnum type) {
        this.type = type;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public String getExam() {
        return exam;
    }

    public void setExam(String exam) {
        this.exam = exam;
    }

    public Integer getLessonId() {
        return lessonId;
    }

    public void setLessonId(Integer lessonId) {
        this.lessonId = lessonId;
    }

    public BigDecimal getClassHourOfTotal() {
        return classHourOfTotal;
    }

    public void setClassHourOfTotal(BigDecimal classHourOfTotal) {
        this.classHourOfTotal = classHourOfTotal;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        StatisticsClassHourAO that = (StatisticsClassHourAO) o;

        if (!userId.equals(that.userId)) {
            return false;
        }
        if (!userName.equals(that.userName)) {
            return false;
        }
        if (!lessonName.equals(that.lessonName)) {
            return false;
        }
        if (!lessonId.equals(that.lessonId)) {
            return false;
        }
        if (classHour != null && !classHour.equals(that.classHour)) {
            return false;
        }
        if (type != that.type) {
            return false;
        }
        if (classId != null && !classId.equals(that.classId)) {
            return false;
        }
        return exam.equals(that.exam);

    }

    @Override
    public int hashCode() {
        int result = userId.hashCode();
        result = 31 * result + userName.hashCode();
        result = 31 * result + lessonName.hashCode();
        result = 31 * result + lessonId.hashCode();
        if (classHour != null) {
            result = 31 * result + classHour.hashCode();
        }
        result = 31 * result + type.hashCode();
        if (classId != null) {
            result = 31 * result + classId.hashCode();
        }
        result = 31 * result + exam.hashCode();
        return result;
    }
}
